package com.centaline.androidsalesblog.api.usercenter;

import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.model.responseobject.VerificationCodeRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 验证码验证
 * Created by guilin on 16/3/18.
 */
public class VerificationCodeApi extends BaseSmsApi<VerificationCodeRo> {

    private String code;

    public VerificationCodeApi(Class<?> tag, Class<VerificationCodeRo> aClass, IResponseListener<VerificationCodeRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    protected void setParams() {
        super.setParams();
        putStringParams("Code", code);
        putStringParams("Sign", md5("APP", AppConstant.CityCode, mobile, code, publicSecret));
    }

    @Override
    protected String getPath() {
        return "VerificationCodeRequest";
    }
}
